package com.suprema.biomini;

import java.util.EventObject;

/**
 * 掃瞄開始及結束時(中斷也一樣)時觸發
 * @author Kent Yeh
 */
public class CaptureEvent extends EventObject {

    private boolean incapture = false;

    public CaptureEvent(SFRDevice source) {
        this(source, true);
    }

    public CaptureEvent(SFRDevice source, boolean incapture) {
        super(source);
        this.incapture = incapture;
    }

    @Override
    public SFRDevice getSource() {
        return (SFRDevice) super.getSource();
    }

    /**
     * 是否在掃瞄中
     * @return true:開始掃瞄,false:結束掃瞄(中斷)
     */
    public boolean isIncapture() {
        return incapture;
    }
}
